﻿using Authentication.Model.Model;
using Common.Contract.Authentication.Record;
using Common.Contract.Paging;
using Common.Contract.SystemConfig.Record;
using System.Collections.Generic;

namespace Authentication.Model.Interface
{
    public interface IChangeDaoProvider
    {
        List<ChangeDaoRequest> RetrieveListChangeDaoRequest(out int totalRecord, UserRecord currentUser, FilterRecord textSearch = null, int pagesize = 0, int pageindex = 0, SortRecord sortRecord = null);
        List<ChangeDaoRequest> RetrieveListChangeDaoRequestByDao(out int totalRecord, UserRecord currentUser, List<int> listChangeDaoId, FilterRecord textSearch = null, int pagesize = 0, int pageindex = 0, SortRecord sortRecord = null);
        List<ChangeDaoCif> RetrieveChangeDaoCif(out int totalRecord, UserRecord currentUser, int changeRequestId, int pagesize = 0, int pageindex = 0);
        List<ChangeDaoCif> RetrieveChangeDaoCif(UserRecord currentUser, List<int> changeRequestId, bool isExport = false);
        List<ChangeDaoProduct> RetrieveListChangeDaoProductByCif(List<ChangeDaoCifRecord> listCif, UserRecord currentUser);
        List<ChangeDaoProductChecked> RetrieveListChangeDaoProductByCifChecked(List<string> listCif, List<int> changeRequestId, bool isExport = false);
        List<ChangeDaoCif> RetrieveChangeDaoCifByDao(UserRecord currentUser);
        List<ChangeDaoProductChecked> RetrieveListChangeDaoProductByDao(UserRecord currentUser);
        List<ChangeDaoProduct> RetrieveListChangeDaoProductByDao(List<string> listDao);
        ChangeDaoRequest SaveChangeDaoRequest(ChangeDaoRequest record);
        bool SaveChangeDaoCif(List<ChangeDaoCif> changeDaoCif, List<ChangeDaoProductChecked> listChangeProduct);
        ChangeDaoRequest RetrieveRequestByRequestId(int id, UserRecord currentUser);
        bool UpdateStatusChangeDaoRequest(ChangeDaoRequest checkUser);
        bool UpdateStatusListChangeDaoRequest(int[] listId, int status);
        ChangeDaoRequest RetrieveChangeDaoRequestByIdAndItem(int id, List<ChangeDaoCifRecord> listChangeDaoCif, List<ChangeDaoProductCheckedRecord> listProduct);
        bool UpdateChangeDaoCif(List<ChangeDaoCif> listChangeDaoCifUpdate);
        bool UpdateChangeDaoProduct(List<ChangeDaoProductChecked> listChangeDaoProductUpdate);
        bool SaveChangeDaoCifMultiple(List<ChangeDaoCifRecord> listChangeDaoCif, List<ChangeDaoCif> changeDaoCif, List<ChangeDaoProduct> listProduct);
    }
}
